<a href="<?php echo( base_url() ); ?>cmb/member_reports/download_unregistered_tickets_list_report/<?php echo( $urlKey ); ?>/" target="_self">Download Data</a>
<?php
	Includes::IncludeFile( Includes::$FORM );
	Includes::IncludeFile( Includes::$SPACER );
	
	$curdatetime = time();
	
	$curdate = date('l, F jS, Y', $curdatetime);
	Form::OpenFormItemSummary('Date:', 50);
		echo( form_label($curdate, 'numrecs', 'style="width: 50px;" ') );
	Form::CloseFormItem();

	$curtime = date('h:i:s A', $curdatetime);
	Form::OpenFormItemSummary('Time:', 50);
		echo( form_label($curtime, 'numrecs', 'style="width: 50px;" ') );
	Form::CloseFormItem();
	
	Form::OpenFormItemSummary('Number of households:', 260);
		echo( form_label(count($householdinfo), 'numrecs', 'style="width: 20px;" ') );
	Form::CloseFormItem();
	echo('<hr style="width:50%; size:10; color:#0000FF;" align="left" />');
	
	Spacer::Render(0, 20);
		
?>
<table border="1">
	<?php
		if (count($householdinfo) > 0)
		{
			foreach($householdinfo as $hharr)
			{
				foreach( $hharr as $hhrec)
				{
					switch($hhrec[2])
					{
						case 'Primary':
							echo('UNREGISTERED<br/>');
							echo($hhrec[0].'<br/>'); //Reg_Id
							echo($hhrec[5].'<br/>'); //Session
							echo($hhrec[3].'<br/>'); //Primary name
							break;							
						case 'Spouse':
							echo($hhrec[3].'<br/>'); //Spouse name
							break;
						case 'Child':
							echo($hhrec[3].','.$hhrec[14].','.$hhrec[18].','.$hhrec[19].'<br/>'); //Child info
							break;
					}
				}
											
				echo('<hr style="width:50%; size:10; color:#0000FF;" align="left" />');
			}
		}
		else
			echo "No results returned";
	?>
</table>
